﻿using System.Threading.Tasks;
using System.Net.Http.Headers;

namespace System.Net.Http
{
    /// <summary>
    /// Provides a interface for IHttpClient for sending HTTP requests and receiving HTTP responses from a resource identified by a URI.
    /// </summary>
    public interface IHttpClient
    {
        /// <summary>
        /// Gets or sets the base address of Uniform Resource Identifier (URI) of the Internet resource used when sending requests.
        /// </summary>
        Uri BaseAddress { get; set; }

        /// <summary>
        /// Gets the headers which should be sent with each request.
        /// </summary>
        HttpRequestHeaders DefaultRequestHeaders { get; }

        /// <summary>
        /// Send a GET request to the specified Uri as an asynchronous operation.
        /// </summary>
        /// <param name="requestUri">The Uri the request is sent to</param>
        /// <returns>The task object representing the asynchronous operation.</returns>
        Task<HttpResponseMessage> GetAsync(Uri requestUri);
    }

}
